function animate1(object, target, callback) {
    clearInterval(object.timer);
    object.timer = setInterval(() => {
        //如果负值后退回有问题
        // var step = Math.ceil((target - object.offsetLeft) / 10);
        var step = (target - object.offsetLeft) / 10;
        step = step > 0 ? Math.ceil(step) : Math.floor(step);
        if (object.offsetLeft == target) {
            clearInterval(object.timer);
            //回调函数卸载定时器的最后执行
            // if (callback) {
            //     callback();
            // }
            // 简便写法
            callback && callback();
        }
        object.style.left = object.offsetLeft + step + 'px'
    }, 30);
}